It's not clear what would give the best result, to do a feedhold or kill all the axes?
Below is some "watchdog" code that runs continuously and when it sees an input change issues a feedhold (StopCoordinatedMotion()). Add the "for" loop to the end of your Init.c program so after your initialization the loop will continue to run.
You might also try replacing the StopCoordinatedMotion with:
DisableAxis(0);
DisableAxis(1);
DisableAxis(2);
which would act more like estop.
I hope this helps.
TK
#include "KMotionDef.h"
main()
{
int fault=0;
for (;;) // repeat forever
{
WaitNextTimeSlice(); // execute one loop per time slice
// check external fault signal
if (!fault && ReadBit(19))
{
fault=1; // remember we are in a fault state
StopCoordinatedMotion(); // do a feed hold
}
if (fault &&
!ReadBit(19))
{
fault=0; // remember we are no longer in a fault state
}
}
}